<?php
/*
 * @Author: your name
 * @Date: 2020-12-07 10:57:29
 * @LastEditTime: 2020-12-07 11:27:31
 * @LastEditors: Please set LastEditors
 * @Description: 系统设置
 * @FilePath: /v3/application/common/system/SystemConfigService.php
 */
namespace app\common\system;

use think\Db;

class SystemConfigService
{
    /**
     * @name: 防火墙默认处理方式
     * @Param: 
     * @Description: 
     * @Author: foo
     * @Date: 2020-12-07 10:59:15
     */
    public function firewallDefaultHandle ()
    {
        //查询防火墙拒绝模式默认配置
        $config = Db::name('SystemConfig')->field('type, process')->find();
        
        $return = $config['type'] == 2 && $config['process'] == 'reject' ? 'reject' : 'drop';

        return $return;
    }
}